package com.app.mymusic.ui;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.app.mymusic.R;
import com.app.mymusic.utils.PreferencesUtils;

import me.imid.swipebacklayout.lib.SwipeBackLayout;

public   class BasicActivity extends AppCompatActivity {
    private SwipeBackLayout swipeBackLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initTheme();
//        requestWindowFeature(Window.FEATURE_NO_TITLE);
//
//        overridePendingTransition(R.anim.activity_ani_enter, 0);
//        getWindow().setBackgroundDrawable(new ColorDrawable(0));
//        getWindow().getDecorView().setBackgroundResource(0);
//        swipeBackLayout = (SwipeBackLayout) LayoutInflater.from(this).inflate(
//                R.layout.base, null);
//        swipeBackLayout.attachToActivity(this);
        setContentView(R.layout.activity_basic);
    }
    public void initTheme(){
        int theme= PreferencesUtils.getInt(this,"theme",R.style.AppTheme1);
        if(theme!=R.style.AppTheme1){
            setTheme(theme);
        }
    };
}
